﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCVehicleServicePending.ascx.cs" Inherits="VSM.UC.UCVehicleServicePending" %>

    <h3 style="text-align:center;">Vehicle Service Pending List</h3>
    <asp:HiddenField ID="hdnisUpdate" runat="server" />
    <script type="text/javascript">
        function OpenOSRN(itemCode, DisNumber) {
            var url = "/UC/UpdateServiceDatePopup.aspx?ItemCode=" + itemCode;
            url += "&DistNumber=" + DisNumber;
            Main.openCustomDialog(url, 610, 310, "Vehicle Service Pending");
        }
    </script>
    <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div style="margin-left: 5px; width: 99%;">                
                <hr />
                <table style="width: 100%;" border="0">
                    <tr>
                        <td>
                            <asp:GridView ID="grvItem" CssClass="GridInner" runat="server" Width="100%" BorderColor="White" BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                                HeaderStyle-Height="27px" CellSpacing="2" HeaderStyle-VerticalAlign="Middle" HeaderStyle-HorizontalAlign="Center" 
                                OnRowDataBound="grvSearchResult_RowDataBound" AllowPaging="True" OnPageIndexChanging="grvSearchResult_PageIndexChanging" PageSize="20">
                                <PagerSettings Mode="NumericFirstLast" />
                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                <Columns>
                                    <asp:TemplateField HeaderText="VIN Number" >
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lnkVinNo" OnClick="lnkVinNo_Click" runat="server" Text='<%# Bind("VinNo") %>' BorderStyle="none" />
                                            <asp:HiddenField ID="hdnItemCode" Value='<%# Bind("ItemCode") %>' runat="server" />
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Engine Number" >
                                        <ItemStyle HorizontalAlign="Center" Width="15%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblEngNo" runat="server" Text='<%# Bind("EngNo") %>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Product" >
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblProduct" runat="server" Text='<%# Bind("Product") %>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Color" >
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblColor" runat="server" Text='<%# Bind("Color") %>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Last Service Date" >
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblInDate" runat="server" Text='<%# Bind("InDate", "{0:dd/MM/yyyy}")%>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Warehouse" >
                                        <ItemStyle HorizontalAlign="Left"  Width="10%" />
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblWhsCode" runat="server" Text='<%# Bind("WhsCode") %>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>

                                    <asp:TemplateField HeaderText="Days" >
                                        <ItemStyle HorizontalAlign="Center" Width="5%"/>
                                        <HeaderStyle VerticalAlign="Middle" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblDays" runat="server" Text='<%# Bind("Days") %>' BorderStyle="none">
                                            </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False" Height="27px" VerticalAlign="Bottom" />
                                <EmptyDataTemplate>
                                    <table class="GridInner" style="width: 100%; border-color: White; text-align: center;" border="1" rules="all"
                                        cellspacing="2" cellpadding="2">
                                        <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none; background-color: rgb(96, 149, 201);">
                                            <th style="width: 20%">
                                                <span>VIN Number</span>
                                            </th>
                                            <th style="width: 15%">
                                                <span>Engine Number</span>
                                            </th>
                                            <th style="width: 20%">
                                                <span>Product</span>
                                            </th>
                                            <th style="width: 20%">
                                                <span>Color</span>
                                            </th>
                                            
                                            <th style="width: 10%">
                                                <span>In Date</span>
                                            </th>
                                            <th style="width: 10%">
                                                <span>Warehouse</span>
                                            </th>
                                            <th style="width: 5%">
                                                <span>Days</span>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td colspan="7">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>